<script type="text/javascript">
//上传图片
function upload(n) {
	var of = $('#uploadFile'+n);
	//检查是否选择了图片
	if(of.val()=='') {
		alert('请选择图片');
		return;
	}
	//将file移动至上传表单
	$('#fileContent').empty();
	$('#fileContent').append(of);
	//复制一个file放至原处
	$('#ufc'+n).append(of.clone());
	//修改属性
	of.attr('id','');
	
	of.attr('name','uploadFile');
	//其他表单
	$('#ufFileName').val($('#fileName'+n).val());
	$('#ufWidth').val($('#zoomWidth'+n).val());
	$('#ufHeight').val($('#zoomHeight'+n).val());
	$('#uploadNum').val(n);	
	$('#uploadForm').submit();
}
</script>
<form id="uploadForm" action="uploadimage.jspx" method="post" enctype="multipart/form-data" target="hiddenIframe" style="display:none;width:0px;height:0px;">
<span id="fileContent">　</span>
<input id="ufWidth" type="hidden" name="zoomWidth"/>
<input id="ufHeight" type="hidden" name="zoomHeight"/>
<input id="uploadNum" type="hidden" name="uploadNum"/>
<input id="ufFileName" type="hidden" name="fileName"/>
</form>
<iframe name="hiddenIframe" frameborder="0" border="0" style="display:none;width:0px;height:0px;"></iframe>